# $Id: PKGBUILD 173239 2012-12-15 22:05:18Z guillaume $
# Maintainer: Guillaume ALAUX <guillaume@archlinux.org> 
# Contributor: Eric Belanger <eric@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>

pkgname=cowsay
pkgver=3.03
pkgrel=8
pkgdesc='Configurable talking cow (and a few other creatures)'
arch=('any')
url='http://www.nog.net/~tony/warez/'
license=('PerlArtistic' 'GPL')
depends=('perl')
source=(http://www.nog.net/~tony/warez/${pkgname}-${pkgver}.tar.gz
        cowsay.patch)
sha256sums=('3406ab1634c7d4d7d3f613b56eb9f1a4da8feaac93664a188b4de9bacb036ce8'
            'aa88442a31f01ffe5884b3ae974ed1ced23d860859d7f2234cdcd3ac437fc17f')

build() {
	cd ${srcdir}/${pkgname}-${pkgver}
	patch -p1 -i $srcdir/cowsay.patch
	sed -i 's|/man/|/share/man/|' install.sh
}

package() {
	cd ${srcdir}/${pkgname}-${pkgver}
	echo "${pkgdir}/usr" | ./install.sh
	# This one is not a valid '.cow' file
	rm ${pkgdir}/usr/share/cows/mech-and-cow
}
